/**
 * Copyright © 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.xs_book.mapper;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;
import com.jeeplus.core.persistence.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import com.jeeplus.modules.xs_book.entity.XsBook;

/**
 * 书籍信息MAPPER接口
 * @author 天竹子
 * @version 2021-07-24
 */
@Mapper
@Repository
public interface XsBookMapper extends BaseMapper<XsBook> {
    /**
     * 删除信息
     * @param bookId
     * @return
     */
    @Delete("delete from xs_book_other where book_id = #{bookId}")
    Integer deleteBook(String bookId);

    @Select("select * from xs_book where name = #{name}")
    XsBook bookNameQuery(String name);


    void deleteByLogic(XsBook xsBook);
}